package com.baijiaoxi.common.model.base.model.base;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

/**
 * 支持记录创建及变更时间
 */
public interface TimeAble {

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    default Date getCreateTime() {
        return null;
    }

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    default void setCreateTime(Date createTime) {

    }
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    default Date getLastUpdateTime() {
        return null;
    }
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    default void setLastUpdateTime(Date lastTime) {

    }
}